<?php
#[Table('language')]
#[PrimaryKey('id')]
class Models_Language extends XPHP_Model
{
	public $id;
	
	public $code;
	
	public $name;
	
	public $flag;
	
	public $default;
	
	public function getIdLang($language)
	{
		$lang = $this->db->where('code', $language)
						->get()
						->result();
		$lang = $lang[0];
		return $lang->id;
	}
}